import Vue from 'vue';
import base from './base';
import depend from './depend';
import element from '../builder/element'
import vant from '../builder/vant'
import iview from '../builder/iview'

export const J_tags = {
	element: {
		dialog: 'el-dialog',
		button: 'el-button',
		tooltip: 'el-tooltip',
		pagination: 'el-pagination',
		link: 'el-link',
		row: 'el-row',
		col: 'el-col',
		tabs: 'el-tabs',
		tabPane: 'el-tab-pane',
		table: 'el-table',
		tableColumn: 'el-table-column',
		form: 'el-form',
		formItem: 'el-form-item',
		// -------------------表单组件----------------------
		input: 'el-input',
		inputNumber: 'el-input-number',
		autocomplete: 'el-autocomplete',
		select: 'el-select',
		option: 'el-option',
		optionGroup: 'el-option-group',
		radio: 'el-radio',
		radioGroup: 'el-radio-group',
		checkbox: 'el-checkbox',
		checkboxButton: 'el-checkbox-button',
		checkboxGroup: 'el-checkbox-group',
		timePicker: 'el-time-picker',
		timeSelect: 'el-time-select',
		datePicker: 'el-date-picker',
		cascader: 'el-cascader',
		switch: 'el-switch'
	},
	vant: {
		dialog: 'van-dialog',
		button: 'van-button',
		tooltip: 'van-tooltip',
		pagination: 'van-pagination',
		link: 'van-link',
		row: 'van-row',
		col: 'van-col',
		tabs: 'van-tabs',
		tabPane: 'van-tab-pane',
		table: 'van-table',
		tableColumn: 'van-table-column',
		form: 'van-form',
		formItem: 'van-cell',
		// -------------------表单组件----------------------
		input: 'van-field',
		inputNumber: 'van-stepper',
		autocomplete: 'van-autocomplete',
		select: 'van-select',
		option: 'van-option',
		optionGroup: 'van-option-group',
		radio: 'van-radio',
		radioGroup: 'van-radio-group',
		checkbox: 'van-checkbox',
		checkboxButton: 'van-checkbox-button',
		checkboxGroup: 'van-checkbox-group',
		timePicker: 'van-time-picker',
		timeSelect: 'van-time-select',
		datePicker: 'van-date-picker',
		cascader: 'van-cascader',
		switch: 'van-switch'
	},
	iview: {
		dialog: 'Modal',
		button: 'Button',
		tooltip: 'Tooltip',
		pagination: 'Page',
		link: 'Link',
		row: 'Row',
		col: 'Col',
		tabs: 'Tabs',
		tabPane: 'TabPane',
		table: 'Table',
		tableColumn: 'template',
		form: 'Form',
		formItem: 'FormItem',
		// -------------------表单组件----------------------
		input: 'Input',
		inputNumber: 'InputNumber',
		autocomplete: 'AutoComplete',
		select: 'Select',
		option: 'Option',
		optionGroup: 'OptionGroup',
		radio: 'Radio',
		radioGroup: 'RadioGroup',
		checkbox: 'Checkbox',
		checkboxButton: 'CheckboxButton',
		checkboxGroup: 'CheckboxGroup',
		timePicker: 'TimePicker',
		timeSelect: 'TimeSelect',
		datePicker: 'DatePicker',
		cascader: 'Cascader',
		switch: 'i-switch'
	}
}

const mapping = {
	...base,
	...depend,
	J_tags,
	J_builder: Object.assign(element, vant, iview),
	//JsBox容器props中默认初始参数配置
	J_jsbox: {
		//最外层JsBox样式  包
		styleJsBox: {
			"style": "-webkit-overflow-scrolling:touch",
		},
		//container容器样式 包含from容器
		styleContainer: {
			'border-radius': '4px',
			'box-shadow': '0 2px 12px 0 rgba(0, 0, 0, 0.1)',
		}
	}
}
export default Vue.prototype.$mapping = mapping;

